Unified management method and system for channel service as well as services on demand of stream media

ABSTRACT

The present invention provides a unified management method system for channel service as well as service on demand of stream media, which belong to the management technology of stream media service. The method comprises: receiving, by a service processing unit, an instruction of creating a channel, obtaining channel resource required by a channel service from a stream media service unit according to the instruction of creating a channel, and performing control interaction on the stream media service unit where the channel resource is located; receiving, by a service processing unit, an RTSP request, obtaining resource on demand required by a service on demand according to the RTSP request, and performing control interaction on a stream media service unit where the resource on demand is located, thereby realizing unified resource management of channel service and service on demand.

TECHNICAL FIELD

The present invention relates to the management technology of streammedia services, and particularly to a unified management method andsystem for channel service as well as service on demand of stream media.

BACKGROUND

Internet Protocol TeleVision (IPTV) is a novel technology for providingvarious interactive services including digital television for home usersby using broadband cable television network integrated with varioustechnologies, such as Internet, multimedia, communication and the like.

IPTV services comprise channel services and services on demand. Thechannel services enable all users to watch the same content at the sametime, comprising: ordinary live channels, carousel channels, andtime-shift channels, and it is necessary to depend on these channelswhen users watch live programs. The services on demand enable each userto freely perform fast forward, fast rewind, and positioning playoperation respectively. The services on demand comprise: Video On Demand(VOD), True Video On Demand (TVOD), and Time Shift TeleVision (TSTV) ondemand on the time-shift channel of the user.

At present, when the channel service is processed, it only needs toperform simple code stream copy and distribution, and when the codestream needs to be processed, it generally further relies on a specifictranscoding server. While a service on demand is processed, it needs toperform file access, play control, and code stream distribution control.Based on the above two different processing manners, the prior practicegenerally adopts a solution of separating the basic units of the channelservice from the basic units of the service on demand, namely, adoptingdifferent software architecture, even different hardware architecture.In terms of cost, two different designs will inevitably increase the R&Dcosts and maintenance costs.

SUMMARY

To solve the above problem, the present invention aims to provide aunified management method and system for channel service as well asservice on demand of stream media, which can realize unified resourcemanagement of channel service and service on demand.

To solve the above problem, the present invention provides a unifiedmanagement method for channel service as well as service on demand ofstream media, which is applied to a stream media system comprising aservice processing unit and a plurality of stream media service units,wherein the method comprises:

receiving, by the service processing unit, an instruction of creating achannel, obtaining channel resource required by a channel service from astream media service unit according to the instruction of creating achannel, and performing control interaction on the stream media serviceunit where the channel resource is located;

receiving, by the service processing unit, a Real Time StreamingProtocol (RTSP) request, obtaining resource on demand required by aservice on demand according to the RTSP request, and performing controlinteraction on a stream media service unit where the resource on demandis located.

Preferably, the service processing unit may comprise: a resourcemanagement module, a channel management module, and a user managementmodule;

the step of obtaining the channel resource required by the channelservice and performing control interaction on the stream media serviceunit where the channel resource is located may comprise:

dividing, by the resource management module, multiple physical networkport resources of the plurality of stream media service units into logicminimum resources that are used by both the channel service and theservice on demand;

applying, by the channel management module, to the resource managementmodule for the channel resource required by the channel serviceaccording to the instruction of creating a channel from a Media LocationService System (MLSS), and performing control interaction on the streammedia service unit where the channel resource is located;

the step of obtaining the resource on demand required by the service ondemand, and performing control interaction on the stream media serviceunit where the resource on demand is located may comprise:

receiving and analyzing, by the user management module, an RTSP requestsent by a Set Top Box (STB), applying to the resource management modulefor the resource on demand required by the service on demand of a useraccording to the RTSP request, and performing control interaction on thestream media service unit where the resource on demand is located.

Preferably, the stream media service unit may comprise: a media controlmodule, a media source analyzing module, a media source control moduleand a media output control module; the method may further comprise:

analyzing and pre-processing, by the media source analyzing module, aUniversal Resource Identifier (URI) to obtain code stream data of theURI, the URI of the channel service is a Session Description Protocol(SDP) description, and the URI of the service on demand is a local file;

controlling, by the media source control module, the code stream dataanalyzed by the media source analyzing module;

copying, by the media output control module, the code stream dataoutputted by the media source control module for each media output, andsending it to a specified media output;

performing, by the medial control module, message interaction with thechannel management module and the user management module in the serviceprocessing unit.

Preferably, type of the media output may comprise: live broadcastuser/service-on-demand user, stream media service unit or storage offile.

Preferably, the step of controlling by the media source control modulethe code stream data analyzed by the media source analyzing module maycomprise:

for the code stream data analyzed by the media source analyzing module,converting, by the media source control module, a type of the codestream data, adding additional function of the code stream data, orcontrolling play of the code stream data.

Preferably, when it is needed to create a channel, the step ofperforming control interaction on the stream media service unit wherethe channel resource is located may comprise:

operating, by the media control module, the media source analyzingmodule to create a new media source, setting attributes of the mediasource, and recording an identifier of the newly-created media source;

operating, by the media control module, the media output control modulewhen the channel management module brings output end information intothe media control module, to create a new corresponding output, eachoutput is provided with an output identifier and belongs to the createdmedia source;

operating, by the media control module, the media source control moduleaccording to the identifier of the newly-created media source, tocontrol the media source control module to start receiving a channelexternal code stream or reading a channel default file.

Preferably, when a live broadcast user is hung under the createdchannel, the method may further comprise:

sending, by the STB, the RTSP request for user play to the usermanagement module, wherein the RTSP request may comprise: userinformation and an identifier of the channel where the user is located;

obtaining, by the user management module, resource for the livebroadcast user, and obtaining the identifier of the media source of thecreated channel according to the identifier of the channel;

sending, by the user management module, a notification message of addinga user to the media control module, wherein the notification message ofadding a user may comprise: user information, and the identifier of themedia source of the channel;

operating, by the media control module, the media output control moduleto create a new external user output, and an identifier of media sourcecorresponding to the external user output is the identifier of the mediasource of the channel.

The step of performing control interaction on the stream media serviceunit where the resource on demand is located may comprise:

operating, by the media control module, the media source analyzingmodule to create a new media source, setting attributes of the mediasource, and recording an identifier of the newly-created media source;

operating, by the media control module, the media output control modulewhen the user management module brings output end information into themedia control module, to create a new corresponding output, each outputis provided with an output identifier and belongs to the created mediasource;

operating, by the media control module, the media source control moduleaccording to the identifier of the newly-created media source, tocontrol the media source control module to start reading a file andcontrolling play rate and packet rate.

Preferably, when the stream media service unit where the channel serviceis located has no resource on demand to provide a service or has ahigher load, the method may further comprise:

finding, by the channel management module, the stream media service unitwhere the channel service is located from the resource managementmodule, and applying to the stream media service unit for an internaluser resource;

notifying, by the channel management module, the media control module ofadding an internal user;

operating, by the media control module, the media output control moduleto add an output, wherein an type of the output is an internal user, theoutput is hung under the media source of the channel and outputted toanother stream media service unit which prepares to create a temporarychannel;

generating, by the channel management module, an SDP file, andinteracting with a media control module on the another stream mediaservice unit which prepares to create a temporary channel to create asame channel.

Preferably, when channel code stream is interrupted accidentally, themethod may further comprise:

reporting, by the media source control module, to the media controlmodule after detecting the interruption of the channel code stream;

reporting, by the media control module, the abnormity of interruption ofthe channel code stream to the channel management module;

transmitting, by the channel management module, a media source replacingmessage to the media control module after receiving a message ofexternal code stream interruption; the URI of the media source ischanged from an external code stream SDP description to a new URI ofdefault file path;

transmitting, by the media control module, a media source switchingmessage to the media source analyzing module.

The present invention further provides a unified management system forchannel service as well as service on demand of stream media, whereinthe system comprises a service processing unit and a plurality of streammedia service units, wherein

the service processing unit is configured to receive an instruction ofcreating a channel, obtain channel resource required by a channelservice from a stream media service unit according to the instruction ofcreating a channel, and perform control interaction on the stream mediaservice unit where the channel resource is located;

the service processing unit is configured to receive an RTSP request,obtain resource on demand required by a service on demand according tothe RTSP request, and perform control interaction on a stream mediaservice unit where the resource on demand is located.

Preferably, the service processing unit may comprise: a resourcemanagement module, a channel management module and a user managementmodule, wherein

the resource management module may be configured to divide multiplephysical network port resources of the plurality of stream media serviceunits into logic minimum resources that are used by both the channelservice and the service on demand;

the channel management module may be configured to apply to the resourcemanagement module for the channel resource required by the channelservice according to the received instruction of creating a channel, andperform control interaction on the stream media service unit where thechannel resource required by the channel service is located;

the user management module may be configured to receive and analyzingthe RTSP request sent an STB, apply to the resource management modulefor the resource required by the service on demand of a user, andperform control interaction on the stream media service unit where theresource on demand required by the service on demand is located.

Preferably, the stream media service unit may comprise: a media controlmodule, a media source analyzing module, a media source control moduleand a media output control module, wherein

the media source analyzing module may be configured to analyze andpre-process a URI of the channel service or the service on demand toobtain code stream data of the URI;

the media source control module may be configured to control the codestream data analyzed by the media source analyzing module;

the media output control module may be configured to copy the codestream data outputted by the media source control module for each mediaoutput, and send it to a specified output;

the media control module may be configured to perform messageinteraction with the channel management module and the user managementmodule in the service processing unit, and perform unified control anddata association with the media source analyzing module, the mediasource control module and the media output control module.

At least one of the above technical solutions has the followingbeneficial effects: through performing control interaction by theservice processing unit, with the stream media service unit where thechannel resource or resource on demand are located according to thereceived instruction of creating a channel and the RTSP request,respectively, unified management of channel service and service ondemand can be realized, so that merging and conversion of channelservice and service on demand may be conveniently performed, andmulti-level architecture of the Content Delivery Network (CDN) can bebetter implemented, which is beneficial to realizing upgrade expansionof services, thereby improving the service stability of the stream mediasystem.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a flowchart of a unified management method for channelservice as well as service on demand of stream media according to anembodiment of the present invention;

FIG. 2 shows a flowchart of a method for creating a channel and hanginga live broadcast user under the channel according to an embodiment ofthe present invention;

FIG. 3 shows a flowchart of a method for service-on-demand useraccording to an embodiment of the present invention;

FIG. 4 shows a flowchart of a method for switching media source uponinterruption of channel code stream according to an embodiment of thepresent invention;

FIG. 5 shows a flowchart of a method for creating a temporary channelaccording to an embodiment of the present invention;

FIG. 6 shows a structural diagram of a unified management system forchannel service as well as service on demand of stream media accordingto an embodiment of the present invention;

FIG. 7 shows a schematic diagram of control and media relations amongthe modules in a media service unit according to an embodiment of thepresent invention.

DETAILED DESCRIPTION

In an embodiment of the present invention, the unified resourcemanagement of channel service and service on demand may be realizedthrough the following solution: a service processing unit receives aninstruction of creating a channel, obtains channel resource required bya channel service from a stream media service unit according to theinstruction of creating a channel, and performs control interaction onthe stream media service unit where the channel resource is located; theservice processing unit receives an RTSP request, obtains resource ondemand required by a service on demand according to the RTSP request,and performs control interaction on the stream media service unit wherethe resource on demand is located.

In this embodiment, there is no strict time-sequence limitation on theprocess of ‘obtaining channel resource required by a channel servicefrom a stream media service unit according to the instruction ofcreating a channel, and performing control interaction on the streammedia service unit where the channel resource is located’ and theprocess of ‘receiving an RTSP request by the service processing unit,obtaining resource on demand required by a service on demand accordingto the RTSP request, and performing control interaction on the streammedia service unit where the resource on demand is located’.

To make the objective, technical solutions and advantages of the presentinvention more elucidated, the present invention will be furtherdescribed in detail below with reference to embodiments and accompanyingdrawings. Here, the exemplary embodiments and explanation of the presentinvention are intended to explain the present invention, not to limitthe present invention.

FIG. 1 shows a flowchart of a unified management method for channelservice as well as service on demand of stream media according to anembodiment of the present invention, which may be applied to a streammedia system. The stream media system may comprise: a service processingunit and a plurality of stream media service units, wherein the serviceprocessing unit comprises a resource management module, a channelmanagement module and a user management module, and the method comprisesthe following steps.

At step 101, the resource management module divides multiple physicalnetwork port resources of the plurality of stream media service unitsinto logic minimum resources that may be used by both the channelservice and the service on demand;

namely, the resource management module may divide the multiple physicalnetwork port resources of the plurality of stream media service unitsinto logic minimum resources in the form of Internet protocol+port(IP+Port) range served by the Real-time Transport Protocol/Real-timeTransport Control Protocol (RTP/RTCP); the logic minimum resources maybe used by both the service on demand and channel service and realizeload sharing according to the current occupied condition when providingservice.

At step 102, the channel management module applies to the resourcemanagement module for channel resource required by channel serviceaccording to a received instruction of creating a channel, and performscontrol interaction on the stream media service unit where the channelresource is located.

At step 103, the user management module receives and analyzes an RTSPrequest sent by a set top box (STB), applies to the resource managementmodule for the resource on demand required by the service on demand ofthe user, and performs control interaction on the stream media serviceunit where the resource on demand is located.

Step 102 and Step 103 are independent processes from each other. Theinitiator of creating a channel (Step 102) is on the operator side,while the initiator of the service on demand of a user (Step 103) is onthe home user side. Thus, there is an order between the Step 102 andStep 103 only when the live broadcast user watches the channel, whilethey are not influenced by each other at other moments.

In the embodiment, the stream media service unit comprises: a mediacontrol module, a media source analyzing module, a media source controlmodule and a media output control module, wherein

the media source analyzing module analyzes and pre-processes a universalresource identifier (URI) to obtain the code stream data of the URI. Fora channel service, the URI is generally a SDP (Session DescriptionProtocol) description, and for the service on demand, the URI isgenerally a local file.

The media source control module performs control processing on the codestream data analyzed by the media source analyzing module. The controlprocessing comprises: converting a type of the code stream data, addingadditional function of the code stream data, or controlling play of thecode stream data, wherein adding the additional function of code streamdata refers to adding extension field to an RTP extension header toimplement a specific function of the service; controlling play of codestream data refers to controlling the packet rate, play rate or playrange.

The media output control module copies the code stream data outputted bythe media source control module for each media output and sends it to aspecified media output.

In the embodiment, the type of media output comprises: service-on-demanduser/live broadcast user (which can be described as external user),stream media service unit (which can be described as internal user), andstorage of file. Because a media source may comprise multiple mediaoutputs, while a media output is of only one type and subordinate to onemedia source, different control mechanisms may be introduced accordingto different transmission types. Fast retransmission and the othercontrol mechanisms may be introduced to the internal and external users,while various control processing such as file storage format, size, nameand the like may be introduced to the storage of the file.

The media control module may perform message interaction with thechannel management module and user management module in the serviceprocessing unit, and may cooperate with the media source analyzingmodule, the media source control module and the media output controlmodule to implement unified control and data association.

It is seen from the above technical solution that, through implementingunified management for channel service as well as service on demand inthe embodiment, merging and conversion of channel service and service ondemand may be conveniently implemented, multi-level architecture of thecontent delivery network (CDN) may be better realized, and upgradeexpansion of the service may be further conveniently realized, therebyimproving the stability of services of the stream media system.

FIG. 2 shows a flowchart of a method for creating a channel and hanginga live broadcast user under the channel according to an embodiment ofthe present invention, namely, when it is needed to create a channel,the performing control interaction on the stream media service unitwhere the channel resource is located comprises the following steps.

At step 201, a media location service system (MLSS) transmits a commandof creating a channel to the channel management module in the serviceprocessing unit;

the command of creating a channel comprises: related information of thechannel, such as channel identifier, channel type, channel ServiceDiscovery Protocol (SDP) and the like.

At step 202, the channel management module obtains channel resourcecapable of providing service from the resource management module.

At step 203, according to the obtained channel resource, the channelmanagement module is positioned to a stream media service unit where thechannel resource is located, and interacts with the media control moduleof the stream media service unit to request for providing a service;

the message of requesting for providing service comprises: media sourceinformation, media source control information, and of course, mediaoutput information.

At step 204, after receiving the request from the channel managementmodule, the media control module operates the media source analyzingmodule to create a new media source, sets attributes of the mediasource, such as service priority and the like, and records an identifierof the media source in data area.

At step 205, when the channel management module brings output endinformation into the media control module, the media control moduleoperates the media output control module to create a new correspondingmedia output, each media output is provided with an output identifierand belongs to the identifier of the media source in Step 204. Theattributes of the output end are also set. If it is a time-shift filestorage, format and type of the file and the like should be specified;and if it is an internal user, it should be specified whetherretransmission is needed and local and remote RTP/RTCP resourceoccupation information of streamed track and the like.

At step 206, the media control module operates the media source controlmodule according to the identifier of the media source, to control themedia source control module to start receiving a channel external codestream or reading a channel default file;

in this step, the transcoding of the media code stream may also becontrolled, or special extension information may be added into the RTPextension header to facilitate expansion of other services, or redundanterror correction coding (such as forward error correction (FEC)) and thelike are performed; the processed code stream is pushed to the outputend; so far, the creation of the channel is completed.

Continuing to refer to FIG. 2, the flow of the method for hanging livebroadcast user under the channel in the embodiment of the presentinvention comprises:

At step 207, the STB sends an RTSP request for user play to the usermanagement module in the service processing unit, wherein the RTSPrequest comprises: user information and an identifier of the channelwhere the user is located.

At step 208, the user management module obtains the resource for thelive broadcast user from the resource management module and obtains therelated information of the created channel according to the identifierof the channel; the related information of the created channel comprisesthe identifier of the media source of the channel;

in this step, when the resource management module allocates the livebroadcast user resource, it firstly allocates the resource of the streammedia service unit where the channel is located. If the resource ofstream media service unit where the channel is located has no userresource available to provide the service or has a higher load, atemporary channel has to be created on the stream media service unit ofother user selectable resource.

At step 209, the user management module interacts with the media controlmodule of the stream media service unit where the user resource islocated, sends a notification message of adding a user to the mediacontrol module to inform the media control module of adding the user;the notification message comprises: user-related information, and theidentifier of the media source of the channel.

At step 210, the media control module operates the media output controlmodule to create a new external user output, and an identifier of mediasource corresponding to the external user output is the identifier ofthe media source of the created channel.

So far, the live broadcast user is successfully added.

FIG. 3 shows a flowchart of a method for service-on-demand useraccording to an embodiment of the present invention; namely, performingcontrol interaction on the stream media service unit where the resourceon demand is located comprises the following steps.

At step 301, the STB sends an RTSP request for user play to the usermanagement module in the service processing unit;

the RTSP request for user play comprises user information.

At step 302, the user management module obtains the resource for theservice-on-demand user from the resource management module.

At step 303, according to the obtained resource for theservice-on-demand user, the user management module is positioned to thestream media service unit where the resource locates and interacts withthe media control module of the stream media service unit for requestingfor providing a service.

At step 304, after receiving the request from the user managementmodule, the media control module operates the media source analyzingmodule to create a new media source, sets the attributes of the mediasource, such as service priority and the like, and records an identifierof the media source in data area.

Step 305, when the user management module brings output end informationinto the media control module, the media control module operates themedia output control module to create a new corresponding media output,each media output is provided with an output identifier and belongs tothe identifier of the media source in Step 304. The attributes of theoutput end are also set. If it is a time-shift file storage, format andtype of the file and the like should be specified; and if it is theinternal user, it should be specified whether retransmission is neededand local and remote RTP/RTCP resource occupation information ofstreamed track and the like.

At step 306, the media control module operates the media source controlmodule according to the identifier of the media source, to control themedia source control module to start reading the file and control theplay rate and packet rate.

Continuing to refer to FIG. 3, it shows a method flow when theservice-on-demand user performs the operation such as fast forward, fastrewind or positioning play and the like in the embodiment, and themethod comprises the following steps.

At step 307, the STB sends an RTSP request from the user for performingfast forward, fast rewind or positioning play to the user managementmodule.

At step 308, the user management module sends a request for modifyingthe service to the media control module.

At step 309, the media control module sends the media source controlmodule a message for modifying media source control to modify the playrate or play initial position and the like.

When the channel code stream is interrupted, FIG. 4 shows a flowchart ofa method for switching media source upon interruption of channel codestream according to an embodiment of the present invention, and themethod comprises the following steps.

At step 401, the media source control module reports to the mediacontrol module after detecting the interruption of the channel codestream;

At step 402, the media control module reports the abnormity ofinterruption of the channel code stream to the channel managementmodule;

At step 403, after receiving a message of external code streaminterruption, the channel management module transmits a media sourcereplacing message to the media control module; the URI of the mediasource is changed from the external code stream SDP description to a newURI of default file path.

At step 404, the media control module transmits a media source switchingmessage to the media source analyzing module. So far, the flow ofplaying a default file upon code stream interruption is completed.

Flows, such as play scheduling, carousel channel and the like in theembodiment are similar to the flows in FIG. 4, which will not bedescribed in detail here, and the convenience of service diversificationor expansion on this basis could be appreciated therefrom.

FIG. 5 shows a flowchart of a method for creating a temporary channelaccording to an embodiment of the present invention. The methodcomprises the following steps.

At step 501, the channel management module finds a stream media serviceunit 1 where the channel is located from the resource management module,and applies to the stream media service unit 1 for internal userresource;

At step 502, the channel management module informs the media controlmodule of adding an internal user;

At step 503, the media control module operates the media output controlmodule to add an output, wherein the type of the output is internaluser, the output is hung under the media source of the channel andoutputted to stream media service unit 2 which prepares to create atemporary channel;

At step 504, the channel management module generates an SDP file, andinteracts with a media control module on the stream media service unit 2which prepares to create a temporary channel to create a same channel;

At step 505, after receiving the request from the channel managementmodule, the media control module operates the media source analyzingmodule to create a new media source and set the attributes of the mediasource, such as service priority and the like, and record an identifierof the media source in data area;

At step 506, the media control module operates the media source controlmodule according to the identifier of the media source to control themedia source control module to start receiving a channel external codestream or reading a channel default file;

in this step, the transcoding of the media code stream may also becontrolled, or special extension information may be added into the RTPextension header to facilitate expansion of other services, or redundanterror correction coding (such as FEC) and the like are performed; theprocessed code stream is pushed to the output end; so far, the creationof the channel is completed.

The creation of the temporary channel is applied to the circumstancewhere the stream media service unit where the channel service is locatedhas no resource on demand to provide a service or has a higher load.

FIG. 6 shows a structural diagram of a unified management system forchannel service as well as service on demand of stream media accordingto an embodiment of the present invention. The system comprises a MLSS,a plurality of STBs and a plurality of CDN service nodes, wherein theCDN service nodes may be central nodes or edge nodes, and each CDNservice node comprises a service processing unit and a plurality ofstream media service units, wherein

the service processing unit is configured to receive an instruction ofcreating a channel, obtain a channel resource required by the channelservice from the stream media service unit according to the instructionof creating a channel, and perform control interaction on the streammedia service unit where the channel resource is located; and

the service processing unit is configured to receive an RTSP request,obtain a resource on demand required by the service on demand accordingto the RTSP request, and perform control interaction on the stream mediaservice unit where the resource on demand is located.

With reference to FIG. 6, the service processing unit is configured tointeract with the MLSS and STB, the service processing unit is a hub forexternal signaling interaction. The service processing unit may beconfigured to manage the plurality of stream media service units,comprising the management of resource and service. In this embodiment,the service processing unit comprises a resource management module, achannel management module, and a user management module.

In this embodiment, the resource management module is configured todivide multiple physical network port resources of the plurality ofstream media service units into logic minimum resources that may be usedby both the channel service and the service on demand;

namely, the resource management module firstly divides the plurality ofstream media service units into stream media service unit 1, streammedia service unit 2, . . . , stream media service unit n; then dividesthe multiple physical media network ports of each stream media serviceunit into subunit 1, subunit 2, . . . , subunit n; and finally divideseach network port into a plurality of circuits, namely circuit 1,circuit 2, . . . , circuit n according to the minimum streamed trackport range occupied by one path of user; thereby, the specific portrange of a specific network port of a stream media service unit is aminimum logic resource. The logic resource is unified to the channelservice and service on demand.

A common channel occupies one resource to receive the code stream, andit needs to occupy one resource to transmit the code stream when onelive broadcast user is hung under the channel. The service-on-demanduser also needs to occupy one resource to transmit the code stream.Thus, the channel service and the service on demand can occupy the sametype of resource, and the difference of resources is shielded by them.Furthermore, in the actual provision of resource, rational load sharingof resources may be realized based on a certain algorithm.

The channel management module is configured to apply to the resourcemanagement module for channel resource required by channel serviceaccording to a received instruction of creating a channel, and performcontrol interaction on the stream media service unit where the channelresource is located;

namely, the channel management module provides unified management of thechannels of the entire service nodes, implements application and releaseof the channel resource, and implements channel-related signalinginteraction such as channel creation, channel deletion and the like incooperation with the MLSS and the stream media service unit.

The user management module is configured to receive and analyze an RTSPrequest sent by STB, apply to the resource management module forresource on demand required by service on demand of the user, andperform control interaction on the stream media service unit where theresource on demand is located.

Namely, the user management module provides unified management of usersof the entire nodes, implements application and release of the userresource, wherein the user comprises live broadcast users hung under thechannel and various forms of service-on-demand users. It implementssignaling interaction, such as user creation, operation in the user playprocess, user deletion and the like in cooperation with the STB and thestream media service unit.

In the embodiment, the stream media service unit comprises a mediacontrol module, a media source analyzing module, a media source controlmodule and a media output control module. FIG. 7 shows a schematicdiagram of control and media relations among the modules according to anembodiment of the present invention.

The media control module is configured to perform message interactionwith the channel management module and user management module in theservice processing unit, and implement unified control and dataassociation with the media source analyzing module, the media sourcecontrol module and the media output control module.

Namely, the media control module is configured to perform messageinteraction with the channel management module and user managementmodule of the service processing unit. When it interacts with the abovetwo modules, it does not discriminate specific services, but justcarries basic information of the service, such as media sourceinformation, source control information, output information and thelike. After receiving the above information, the media control moduleimplements setting and unified association control for the media sourceanalyzing module, the media source control module and the media outputcontrol module.

As shown in FIG. 7, the media control modules controls turningon/switching/turning off the media source.

The media source analyzing module is configured to analyze andpre-process the URI to obtain the code stream data of the URI;

namely, the media source analyzing module is configured to analyze andpre-process the URI of the media source to obtain basic code streamcharacteristics of the URI. One service has only one media source andonly one URI. Each media source has one identifier, which acts as themedia source index of the media control module and establishes anassociation with the occupied resource. The URI is generally SDPdescription for the channel, and the identifier of the media source isin a one-to-one correspondence to the resource occupied by the channelcode stream, while the media source of the live broadcast user hungunder the channel is consistent with the media source of the channel towhich it belongs. URI is generally a local file for a service on demand,and each service-on-demand user has only one media source, which is in aone-to-one correspondence to the resource occupied for sending user codestream.

The media output control module is configured to copy the code streamdata outputted by the media source control module for each media output,and send it to the specified output;

namely, the media output control module copies a code stream from themedia source control module for each media output, and sends it to aspecified output. The output may be of various types, such as livebroadcast/service-on-demand user, storage of file and the like.

As shown in FIG. 7, the media control module controls the media outputcontrol module to add/delete/modify the media output.

The media source control module is configured to control the code streamdata analyzed by the media source analyzing module;

namely, the media source control module controls the code stream dataanalyzed by the media source analyzing module which belongs to the mediasource, and pushes it to all the outputs belonging to the media source.The control may mainly be transcoding, namely the converting the type ofthe code stream; adding an additional function to the code stream, suchas adding an extension field to an RTP extension header to realize thespecific function of the service; or performing redundant errorcorrection coding (such as FEC); controlling play of code stream, suchas controlling packet rate, play rate or play range and the like. Themedia source control module should report timely the abnormity ofcurrent file-read, abnormal interruption of the code stream and the liketo the media control module, report timely the file-read from thebeginning to the end, and make statistics on the quality of the sourcecode stream.

As shown in FIG. 7, the media control module controls the media sourcecontrol module to modify the media source.

The above is only preferred embodiments of the present invention. Itshould be noted that, those skilled in the art may make variousimprovements and modifications without departing from the principle ofthe present invention, and these improvements and modifications shouldbe considered within the protection scope of the present invention.

The invention claimed is:
 1. A unified management method for channelservice as well as service on demand of stream media, which is appliedto a stream media system comprising a service processing unit and aplurality of stream media service units, wherein the service processingunit comprises: a resource management module, a channel managementmodule and a user management module, and the stream media service unitcomprises: a media control module, a media source analyzing module, amedia source control module and a media output control module, themethod comprising: receiving, by the service processing unit, aninstruction of creating a channel, obtaining channel resource requiredby a channel service from a stream media service unit according to theinstruction of creating a channel, and performing control interaction onthe stream media service unit where the channel resource is located,thus creating the channel which is used for the channel service relatedto a live program; receiving, by the service processing unit, a RealTime Streaming Protocol (RTSP) request, obtaining resource on demandrequired by a service on demand according to the RTSP request, andperforming control interaction on a stream media service unit where theresource on demand is located; wherein the step of obtaining the channelresource required by the channel service and performing controlinteraction on the stream media service unit where the channel resourceis located comprises: dividing, by the resource management module,multiple physical network port resources of the plurality of streammedia service units into logic minimum resources that are used by boththe channel service and the service on demand; applying, by the channelmanagement module, to the resource management module for the channelresource required by the channel service according to the instruction ofcreating a channel from a Media Location Service System (MLSS), andperforming control interaction on the stream media service unit wherethe channel resource is located; the step of obtaining the resource ondemand required by the service on demand, and performing controlinteraction on the stream media service unit where the resource ondemand is located comprises: receiving and analyzing, by the usermanagement module, an RTSP request sent by a Set Top Box (STB), applyingto the resource management module for the resource on demand required bythe service on demand of a user according to the RTSP request, andperforming control interaction on the stream media service unit wherethe resource on demand is located; the method further comprising:analyzing and pre-processing, by the media source analyzing module, aUniversal Resource Identifier (URI) to obtain code stream data of theURI, the URI of the channel service is a Session Description Protocol(SDP) description, and the URI of the service on demand is a local file;controlling, by the media source control module, the code stream dataanalyzed by the media source analyzing module; copying, by the mediaoutput control module, the code stream data outputted by the mediasource control module for each media output, and sending it to aspecified media output; performing, by the media control module, messageinteraction with the channel management module and the user managementmodule in the service processing unit; wherein the step of performingcontrol interaction on the stream media service unit where the resourceon demand is located comprises: operating, by the media control module,the media source analyzing module to create a new media source, settingattributes of the media source, and recording an identifier of thenewly-created media source; operating, by the media control module, themedia output control module when the user management module bringsoutput end information into the media control module, to create a newcorresponding output, each output is provided with an output identifierand belongs to the created media source; operating, by the media controlmodule, the media source control module according to the identifier ofthe newly-created media source, to control the media source controlmodule to start reading a file and control play rate and packet rate;wherein when channel code stream is interrupted accidentally, the methodfurther comprising: reporting, by the media source control module, tothe media control module after detecting the interruption of the channelcode stream; reporting, by the media control module, the abnormity ofinterruption of the channel code stream to the channel managementmodule; transmitting, by the channel management module, a media sourcereplacing message to the media control module after receiving a messageof external code stream interruption; the URI of the media source ischanged from an external code stream SDP description to a new URI ofdefault file path; transmitting, by the media control module, a mediasource switching message to the media source analyzing module.
 2. Themethod according to claim 1, wherein type of the media output comprises:live broadcast user/service-on-demand user, stream media service unit orstorage of file.
 3. The method according to claim 1, wherein the step ofcontrolling by the media source control module the code stream dataanalyzed by the media source analyzing module comprises: for the codestream data analyzed by the media source analyzing module, converting,by the media source control module, a type of the code stream data,adding additional function of the code stream data, or controlling playof the code stream data.
 4. The method according to claim 1, whereinwhen it is needed to create a channel, the step of performing controlinteraction on the stream media service unit where the channel resourceis located comprises: operating, by the media control module, the mediasource analyzing module to create a new media source, setting attributesof the media source, and recording an identifier of the newly-createdmedia source; operating, by the media control module, the media outputcontrol module when the channel management module brings output endinformation into the media control module, to create a new correspondingoutput, each output is provided with an output identifier and belongs tothe created media source; operating, by the media control module, themedia source control module according to the identifier of thenewly-created media source, to control the media source control moduleto start receiving a channel external code stream or reading a channeldefault file.
 5. The method according to claim 4, wherein when a livebroadcast user is hung under the created channel, the method furthercomprises: sending, by the STB, the RTSP request for user play to theuser management module, wherein the RTSP request comprises: userinformation and an identifier of the channel where the user is located;obtaining, by the user management module, resource for the livebroadcast user, and obtaining the identifier of the media source of thecreated channel according to the identifier of the channel; sending, bythe user management module, a notification message of adding a user tothe media control module, wherein the notification message of adding auser comprises: user information, and the identifier of the media sourceof the channel; operating, by the media control module, the media outputcontrol module to create a new external user output, and an identifierof media source corresponding to the external user output is theidentifier of the media source of the channel.
 6. The method accordingto claim 1, wherein when the stream media service unit where the channelservice is located has no resource on demand to provide a service or hasa higher load, the method further comprises: finding, by the channelmanagement module, the stream media service unit where the channelservice is located from the resource management module, and applying tothe stream media service unit for an internal user resource; informing,by the channel management module, the media control module of adding aninternal user; operating, by the media control module, the media outputcontrol module to add an output, wherein an type of the output is aninternal user, the output is hung under the media source of the channeland outputted to another stream media service unit which prepares tocreate a temporary channel; generating, by the channel managementmodule, an SDP file, and interacting with a media control module on theanother stream media service unit which prepares to create a temporarychannel to create a same channel.
 7. A unified management system forchannel service as well as service on demand of stream media,comprising: a service processing unit and a plurality of stream mediaservice units, wherein the service processing unit comprises: a resourcemanagement module, a channel management module and a user managementmodule, and the stream media service unit comprises: a media controlmodule, a media source analyzing module, a media source control moduleand a media output control module, the service processing unit isconfigured to receive an instruction of creating a channel, obtainchannel resource required by a channel service from a stream mediaservice unit according to the instruction of creating a channel, andperform control interaction on the stream media service unit where thechannel resource is located, thus creating the channel which is used forthe channel service related to a live program; the service processingunit is configured to receive an RTSP request, obtain resource on demandrequired by a service on demand according to the RTSP request, andperform control interaction on a stream media service unit where theresource on demand is located; wherein the resource management module isconfigured to divide multiple physical network port resources of theplurality of stream media service units into logic minimum resourcesthat are used by both the channel service and the service on demand; thechannel management module is configured to apply to the resourcemanagement module for the channel resource required by the channelservice according to the received instruction of creating a channel, andperform control interaction on the stream media service unit where thechannel resource required by the channel service is located; the usermanagement module is configured to receive and analyze the RTSP requestsent an STB, apply to the resource management module for the resourcerequired by the service on demand of a user, and perform controlinteraction on the stream media service unit where the resource ondemand required by the service on demand is located; wherein the mediasource analyzing module is configured to analyze and pre-process a URIof the channel service or the service on demand to obtain code streamdata of the URI; the media source control module is configured tocontrol the code stream data analyzed by the media source analyzingmodule; the media output control module is configured to copy the codestream data outputted by the media source control module for each mediaoutput, and send it to a specified output; the media control module isconfigured to perform message interaction with the channel managementmodule and the user management module in the service processing unit,and perform unified control and data association with the media sourceanalyzing module, the media source control module and the media outputcontrol module; wherein the operation that the user management moduleperforms control interaction on the stream media service unit where theresource on demand is located comprises: the media control module isconfigured to operate the media source analyzing module to create a newmedia source, set attributes of the media source, and record anidentifier of the newly-created media source; the media control moduleis configured to operate the media output control module when the usermanagement module brings output end information into the media controlmodule, to create a new corresponding output, each output is providedwith an output identifier and belongs to the created media source; themedia control module is configured to operate the media source controlmodule according to the identifier of the newly-created media source, tocontrol the media source control module to start reading a file andcontrol play rate and packet rate; wherein when channel code stream isinterrupted accidentally, the media source control module is configuredto report to the media control module after detecting the interruptionof the channel code stream; the media control module is configured toreport the abnormity of interruption of the channel code stream to thechannel management module; the channel management module is configuredto transmit a media source replacing message to the media control moduleafter receiving a message of external code stream interruption; the URIof the media source is changed from an external code stream SDPdescription to a new URI of default file path; the media control moduleis configured to transmit a media source switching message to the mediasource analyzing module.
 8. The method according to claim 2, wherein thestep of controlling by the media source control module the code streamdata analyzed by the media source analyzing module comprises: for thecode stream data analyzed by the media source analyzing module,converting, by the media source control module, a type of the codestream data, adding additional function of the code stream data, orcontrolling play of the code stream data.